﻿<%@ Page Title=""  Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="UsuarioFormActualizar.aspx.cs" Inherits="proyGestionActivos.UsuarioFormActualizar" %>


<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx1" %>

<asp:Content ID="Content2" ContentPlaceHolderID="id_transfiter" runat="server">
    <script type="text/javascript">
     function soloLetras(e) {
         key = e.keyCode || e.which;
         tecla = String.fromCharCode(key).toLowerCase();
         letras = " áéíóúabcdefghijklmnñopqrstuvwxyz";
         especiales = [8, 32, 37, 39, 46];
         tecla_especial = false
         for (var i in especiales) {
             if (key == especiales[i]) {
                 tecla_especial = true;
                 break;
             }
         }

         if (letras.indexOf(tecla) == -1 && !tecla_especial) {
             return false;
         }
     }

   
</script>
 <script type="text/javascript">

  function Redireccionar() {

         window.location.href = "UsuarioForm.aspx?id="+ <%=ConfigurationManager.AppSettings["Seguridad"]%>;

     }
   </script>

<div class="main-header" style="width:100%">
                <div class="main-titulo">
                    Actualizar Usuarios</div>
               
            </div>


<script type="text/javascript">

    // <![CDATA[

       function ShowPopErrorCambioPass() {
           PopErrorCambioPass.Show();

       }

       function ShowMsj() {
           popupmsj.Show();
       }

    // ]]> 
    </script>


    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <div class="content-form">
           
          <div class="content-tree">
      <table>
<tr>
<td>
    <dx:ASPxButton ID="btnGrabar" runat="server" Text="Grabar" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" 
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
        onclick="btnGrabar_Click">
    </dx:ASPxButton>

</td>
<td>

    <dx:ASPxButton ID="btnLimpiar" runat="server" Text="Limpiar" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" onclick="btnLimpiar_Click" 
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
    </dx:ASPxButton>

</td>


<td>

    <dx:ASPxButton ID="btnSalir" runat="server" Text="Salir" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" 
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
        onclick="btnSalir_Click">
    </dx:ASPxButton>

</td>
</tr>
</table>
<div style="width:45%;float:left;">
                <dx:ASPxRoundPanel ID="RPdatosGenerales" runat="server" 
                    HeaderText="Datos Generales" Width="100%" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
                    GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Height="200px">
                    <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
                        PaddingTop="10px" />
<ContentPaddings PaddingLeft="9px" PaddingTop="10px" PaddingRight="11px" PaddingBottom="10px"></ContentPaddings>

                    <HeaderStyle>
                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
                        PaddingTop="3px" />
<Paddings PaddingLeft="9px" PaddingTop="3px" PaddingRight="11px" PaddingBottom="6px"></Paddings>
                    </HeaderStyle>
                    <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
    <table>
    <tr>
    <td>
    Usuario:
    
    </td>
    <td>
        <dx:ASPxTextBox ID="txtUsuario" runat="server" Width="100%" 
            ClientEnabled="False" MaxLength="20">
<ValidationSettings ErrorText="Valor inv&#225;lido">
<RegularExpression ErrorText="Fall&#243; la validaci&#243;n de expresi&#243;n Regular"></RegularExpression>
</ValidationSettings>
        </dx:ASPxTextBox>
    </td>
    
    </tr>
    <tr>
    <td>
    Nombre Usuario:
    </td>
    <td>
     <dx:ASPxTextBox ID="txtNombreUsuario" runat="server" onkeypress="return soloLetras(event)" Width="100%" MaxLength="50">
        </dx:ASPxTextBox>
    </td>
    </tr>
    <tr>
    <td>
    Apellidos:
    
    </td>
    <td>
    <dx:ASPxTextBox ID="txtApellidos" runat="server" onkeypress="return soloLetras(event)" Width="100%" MaxLength="50">
    </dx:ASPxTextBox>
    
    </td>
    </tr>
    <tr>
    <td>
    Correo Electronico:
    
    </td>
    <td>
    <dx:ASPxTextBox ID="txtCorreoElectronico" runat="server" Width="100%" 
            MaxLength="50">
        </dx:ASPxTextBox>
    
    </td>
    <td>
    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ErrorMessage="Email incorrecto" SetFocusOnError="True" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
            ControlToValidate="txtCorreoElectronico"></asp:RegularExpressionValidator>
    </td>
    </tr>
    <tr>
    <td colspan="2">
    
        <dx:ASPxButton ID="btnCambiarPassword" runat="server" Text="Cambiar Password" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" 
            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
            Width="203px" AutoPostBack="False" OnClick="btnCambiarPassword_Click">
           <ClientSideEvents Click="function(s, e) {
	PopupCambiarPass.Show();
}"></ClientSideEvents>
        </dx:ASPxButton>
    </td>
    
    </tr>
    <tr>
    <td>
    Estado:
    </td>
    <td>
    
        <dx:ASPxComboBox ID="cboEstado" runat="server" SelectedIndex="0" Width="100%" >
            <Items>
                <dx:ListEditItem Selected="True" Text="Seleccione" />
                <dx:ListEditItem Text="Activo" Value="Activo" />
                <dx:ListEditItem Text="Inactivo" Value="Inactivo" />
            </Items>
<ValidationSettings ErrorText="Valor inv&#225;lido">
<RegularExpression ErrorText="Fall&#243; la validaci&#243;n de expresi&#243;n Regular"></RegularExpression>
</ValidationSettings>
        </dx:ASPxComboBox>
    </td>
    
    </tr>
    <tr>
    <td>
    Recordar:
    </td>
    <td>
    
 <dx:ASPxCheckBox ID="CheckBoxRecordar" runat="server" Text="Inicio de sesión">
<ValidationSettings ErrorText="Valor inv&#225;lido">
<RegularExpression ErrorText="Fall&#243; la validaci&#243;n de expresi&#243;n Regular"></RegularExpression>
</ValidationSettings>
        </dx:ASPxCheckBox>
    </td>
    </tr>
    <tr>
    <td><dx:ASPxTextBox ID="txtUserCreacion" runat="server" ClientVisible="False" 
            Width="1px" Height="1px">
        </dx:ASPxTextBox>
       
        </td>
        
    </tr>
    </table>



                        </dx:PanelContent>
</PanelCollection>
                </dx:ASPxRoundPanel>
            </div>
            
            
          <div style="width:50%;float:left;padding-left:20px;">
            

                </div>



     </div>
          <div class="formulario-opcion">
     
            <table>
     <tr>
     <td>
     
     
     
     
     
     
     
                <dx:ASPxRoundPanel ID="RPAccesoUsuario" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
                    GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
                    HeaderText="Accesos del Usuario" Height="406px" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100%">
                    <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
                        PaddingTop="10px" />
                    <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
                        PaddingTop="10px" />
                    <HeaderStyle>
                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
                        PaddingTop="3px" />
                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
                        PaddingTop="3px" />
                    </HeaderStyle>
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server" 
                            SupportsDisabledAttribute="True">
                            <dx:ASPxGridView ID="gvAccesos_Usuarios" runat="server" 
                                AutoGenerateColumns="False" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" KeyFieldName="nombre" 
                                OnAfterPerformCallback="gvAccesos_Usuarios_AfterPerformCallback" Width="100%">
                                <Columns>
                                    <dx:GridViewCommandColumn Caption="Marcar" ShowInCustomizationForm="True" 
                                        ShowSelectCheckbox="True" VisibleIndex="2">
                                    </dx:GridViewCommandColumn>
                                    <dx:GridViewDataTextColumn Caption="Nombre" FieldName="nombre" 
                                        ShowInCustomizationForm="True" VisibleIndex="0">
                                        <PropertiesTextEdit>
                                            <ValidationSettings ErrorText="Valor inválido">
                                                <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                            </ValidationSettings>
                                        </PropertiesTextEdit>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Descripción" FieldName="descripcion" 
                                        ShowInCustomizationForm="True" VisibleIndex="1">
                                        <PropertiesTextEdit>
                                            <ValidationSettings ErrorText="Valor inválido">
                                                <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                            </ValidationSettings>
                                        </PropertiesTextEdit>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="id" ShowInCustomizationForm="True" 
                                        Visible="False" VisibleIndex="3">
                                        <PropertiesTextEdit>
                                            <ValidationSettings ErrorText="Valor inválido">
                                                <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                            </ValidationSettings>
                                        </PropertiesTextEdit>
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                                <SettingsBehavior AllowFocusedRow="True" AllowSort="False" />
                                <SettingsBehavior AllowFocusedRow="True" />
                                <SettingsPager PageSize="50">
                                </SettingsPager>
                                <SettingsLoadingPanel Text="Cargando&amp;hellip;" />
                                <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanelOnStatusBar>
                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanel>
                                </Images>
                                <ImagesFilterControl>
                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanel>
                                </ImagesFilterControl>
                                <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue">
                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                    </Header>
                                    <LoadingPanel ImageSpacing="5px">
                                    </LoadingPanel>
                                </Styles>
                                <StylesPager>
                                    <PageNumber ForeColor="#3E4846">
                                    </PageNumber>
                                    <Summary ForeColor="#1E395B">
                                    </Summary>
                                </StylesPager>
                                <StylesEditors ButtonEditCellSpacing="0">
                                    <ProgressBar Height="21px">
                                    </ProgressBar>
                                </StylesEditors>
                            </dx:ASPxGridView>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxRoundPanel>

     
     
     





     </td>
     
     
     
     
     </tr>
     
     
     
     
     </table>
                
            </div>

     
     
      <br />
          <br />



          




          <dx:ASPxPopupControl ID="PopupCambiarPass" runat="server" 
              ClientInstanceName="PopupCambiarPass" 
              CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
              HeaderText="Cambiar Password" LoadingPanelText="Cargando&amp;hellip;" 
              Modal="True" PopupHorizontalAlign="WindowCenter" 
              PopupVerticalAlign="WindowCenter" 
              SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px">
              <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
              </LoadingPanelImage>
              <CloseButtonStyle>
                  <Paddings Padding="0px" />
                  <Paddings Padding="0px" />
              </CloseButtonStyle>
              <ContentStyle>
                  <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                  <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
              </ContentStyle>
              <HeaderStyle>
              <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                  PaddingTop="4px" />
              <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                  PaddingTop="4px" />
              </HeaderStyle>
              <ContentCollection>
                  <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" 
                      SupportsDisabledAttribute="True">
                      <table>
                          <tr>
                              <td>
                                  Password anterior:
                              </td>
                              <td>
                                  <dx:ASPxTextBox ID="txtPassWordAnterior" runat="server" MaxLength="50" 
                                      Password="True" Width="160px">
                                      <ValidationSettings ErrorText="Valor inválido">
                                          <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                      </ValidationSettings>
                                  </dx:ASPxTextBox>
                              </td>
                          </tr>
                          <tr>
                              <td>
                                  &nbsp;</td>
                              <td>
                                  &nbsp;</td>
                          </tr>
                          <tr>
                              <td>
                                  Password nuevo:
                              </td>
                              <td>
                                  <dx:ASPxTextBox ID="txtPasswordNuevo" runat="server" MaxLength="50" 
                                      Password="True" Width="160px">
                                      <ValidationSettings ErrorText="Valor inválido">
                                          <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                      </ValidationSettings>
                                  </dx:ASPxTextBox>
                              </td>
                          </tr>
                      </table>
                      <table>
                          <tr>
                              <td>
                                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;</td>
                              <td>
                                  <dx:ASPxButton ID="btnAceptarPop" runat="server" AutoPostBack="False" 
                                      CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                      CssPostfix="Office2010Blue" OnClick="btnAceptarPop_Click" 
                                      SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Aceptar">
                                      <ClientSideEvents Click="function(s, e) {
	PopupCambiarPass.Hide();	
    e.processOnServer = true;
}" />
                                  </dx:ASPxButton>
                              </td>
                              <td>
                                  <dx:ASPxButton ID="btnCancelarPop" runat="server" AutoPostBack="False" 
                                      CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                      CssPostfix="Office2010Blue" 
                                      SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                      Text="Cancelar" OnClick="btnCancelarPop_Click">
                                      <ClientSideEvents Click="function(s, e) {
	PopupCambiarPass.Hide();
}" />
                                  </dx:ASPxButton>
                              </td>
                          </tr>
                      </table>
                  </dx:PopupControlContentControl>
              </ContentCollection>
          </dx:ASPxPopupControl>



          




          <br />
          <dx:ASPxPopupControl ID="popupmsj" runat="server" AllowDragging="True" 
              ClientInstanceName="popupmsj" CloseAction="None" 
              CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
              EnableViewState="False" HeaderText="Mensaje" 
              LoadingPanelText="Cargando&amp;hellip;" Modal="True" 
              PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
              SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px">
              <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
              </LoadingPanelImage>
              <CloseButtonStyle>
                  <Paddings Padding="0px" />
              </CloseButtonStyle>
              <ContentStyle>
                  <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
              </ContentStyle>
              <HeaderStyle>
              <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                  PaddingTop="4px" />
              </HeaderStyle>
              <ContentCollection>
                  <dx:PopupControlContentControl ID="PopupControlContentControl5" runat="server" 
                      SupportsDisabledAttribute="True">
                      <br />
                      <dx:ASPxPanel ID="ASPxPanel2" runat="server" DefaultButton="btCreate">
                          <PanelCollection>
                              <dx:PanelContent ID="Panelpopup" runat="server">
                                  <table align="center">
                                      <tr>
                                          <td>
                                              <dx:ASPxLabel ID="lblmsj" runat="server">
                                              </dx:ASPxLabel>
                                          </td>
                                      </tr>
                                      <tr>
                                          <td>
                                              &nbsp;</td>
                                      </tr>
                                  </table>
                                  <table align="center">
                                      <tr>
                                          <td align="center" style="width: 215px">
                                              <dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" 
                                                  CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                  CssPostfix="Office2010Blue" 
                                                  SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                                  Text="Aceptar" OnClick="ASPxButton1_Click">
                                                  <ClientSideEvents Click="function(s, e) {
	popupmsj.Hide();
}" />
                                              </dx:ASPxButton>
                                          </td>
                                      </tr>
                                  </table>
                              </dx:PanelContent>
                          </PanelCollection>
                      </dx:ASPxPanel>
                  </dx:PopupControlContentControl>
              </ContentCollection>
          </dx:ASPxPopupControl>
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />
          <br />


          




 </div>
    
    </ContentTemplate>
    </asp:UpdatePanel>

    
 


</asp:Content>
